<?php
namespace app\Modules\Api\helper;
use Yii;
use yii\data\Pagination as BaseModel;
class Pagination{
    public static function get($count,$pageSize = 6){
        $pagination = new BaseModel([
            'totalCount' => $count,
            'pageSize'=>Yii::$app->request->post('pageSize',$pageSize),
            'page'=>Yii::$app->request->post('page'),
        ]);
        return $pagination;
    }
}